(display "\n========================================\n")
; 逆序
(define (square-list items)
    (define (iter things answer)
        (if (null? things)
            answer
            (iter (cdr things)
                  (cons (square (car things)) answer))))
    (iter items ()))

(display (square-list (list 1 2 3 4)))
(newline)
; 错误组合
(define (square-list items)
    (define (iter things answer)
        (if (null? things)
            answer
            (iter (cdr things)
                  (cons answer (square (car things))))))
    (iter items ()))

(display (square-list (list 1 2 3 4)))
(newline)
; 顺序
(define (square-list items)
    (define (iter things answer)
        (if (null? things)
            (reverse answer)
            (iter (cdr things)
                  (cons (square (car things)) answer))))
    (iter items ()))

(display (square-list (list 1 2 3 4)))
(display "\n========================================\n")
